<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="{:url('coupon/index')}">优惠券列表</a></li>
        <li><a href="{:url('coupon/add')}">添加优惠券</a></li>
    </ul>
    <form class="well form-inline margin-top-20" method="post" action="{:url('coupon/index')}">
        <if condition="$sessionAdminId eq 1">
        店铺名称:
        <input type="text" class="form-control" name="name" value="{:input('request.name/s','')}" placeholder="请输入店铺名称">
        </if>
        状态:
        <select name="status" class="form-control">
            <option <if condition="$status eq 0"> selected </if> value="">--全部--</option>
            <option <if condition="$status eq 1"> selected </if> value="1">--发布--</option>
            <option <if condition="$status eq 2"> selected </if> value="2">--下线--</option>
        </select>
        <input type="submit" class="btn btn-primary" value="搜索" />
        <a class="btn btn-danger" href="{:url('coupon/index')}">清空</a>
    </form>
        <table class="table table-hover table-bordered table-list">
            <thead>
            <tr>
                <th>ID</th>
                <th>满</th>
                <th>减</th>
                <th>发布平台</th>
                <th>备注</th>
                <th>有效期</th>
                <th>优惠券状态</th>
                <th>添加时间</th>
                <th>{:lang('ACTIONS')}</th>
            </tr>
            </thead>
            <tbody>
            <foreach name="coupon" item="vo">
                <tr>
                    <td>{$vo.id}</td>
                    <td>{$vo.full}</td>
                    <td>{$vo.reduce}</td>
                    <td>{$vo.shopname}</td>
                    <td>{$vo.remark}</td>
                    <td>{$vo.stime} - {$vo.etime}</td>
                    <td>{$vo['status'] == 1 ? '发布' : '下线'}</td>
                    <td>{$vo.addtime}</td>
                    <td>
                        <a class="btn btn-xs btn-primary" href="{:url('coupon/edit',array('id'=>$vo['id']))}">{:lang('EDIT')}</a>
                        <a class="btn btn-xs btn-info" href="{:url('coupon/lst',array('id'=>$vo['id']))}">领取记录</a>
                        <!-- <a class="btn btn-xs btn-danger" href="{:url('shop/delete',array('id'=>$vo['id']))}" class="js-ajax-delete">
                            {:lang('DELETE')}
                        </a> -->
                    </td>
                </tr>
            </foreach>
            </tbody>
        </table>
        <div class="pagination">{$page|default=''}</div>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>